package com.fgsecure.apjhnou.app;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.webkit.WebView;
import android.widget.Toast;

public class ViewItemActivity extends Activity {
	WebView mWebView;

	@SuppressLint("SetJavaScriptEnabled")
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.view_item);
		String uri = this.getIntent().getExtras().getString("uri");
		Toast.makeText(this, uri, Toast.LENGTH_LONG).show();
		mWebView = (WebView) this.findViewById(R.id.webView1);
		mWebView.getSettings().setJavaScriptEnabled(true);
		mWebView.getSettings().setPluginsEnabled(true);
		mWebView.loadUrl("file:///"
				+ Environment.getExternalStorageDirectory().getAbsolutePath()
				+ uri);
	}
	@Override
	protected void onStop() {
		super.onStop();
		mWebView.stopLoading();
	}

}